package cn.gailvlun.gll.net.emotion;

import java.util.List;
import java.util.Map;

import cn.gailvlun.gll.bean.PlaceHolder;
import cn.gailvlun.gll.net.ListRes;
import cn.gailvlun.gll.net.Optional;
import cn.gailvlun.gll.net.base.Profile;
import cn.gailvlun.gll.net.token.Authorization;
import io.reactivex.Completable;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;



public interface EmotionService {

    
    @Authorization
    @GET("/emotion/v4/record/list/")
    Observable<ListRes<Emotion>> emotionListG(@Optional @Query("id") Integer id,
                                              @Query("direction") String direction,
                                              @Query("limit") Integer limit,
                                              @Query("emo_big_type") String filterEnum);

    @Authorization
    @GET("/emotion/v1/record/list/")
    Observable<ListRes<Emotion>> getCertaionEmotion(@Optional @Query("id") Integer id,
                                                    @Query("emotion") String emotion,
                                                    @Query("direction") String direction,
                                                    @Query("limit") Integer limit);

    
    @Authorization
    @GET("/emotion/v2/record/list/")
    Observable<ListRes<Emotion>> emotionListP(@Query("start_date") long startDate,
                                              @Query("end_date") long endDate,
                                              @Query("limit") Integer limit,
                                              @Query("lastone") String lastOne);


    @Authorization
    @GET("/emotion/v1/record/list/")
    Observable<ListRes<Emotion>> emotionListPWithCalendar(@Query("start_date") long startDate,
                                                          @Query("end_date") long endDate,
                                                          @Query("limit") Integer limit,
                                                          @Query("lastone") String lastOne);

    
    @Authorization
    @GET("/emotion/v4/record/")
    Observable<Emotion> emotionDetail(@Query("record_id") int id);

    
    @Authorization
    @GET("emotion/comment/")
    Observable<ListRes<Comment>> commentList(@Query("record_id") int recordId,
                                             @Query("id") Integer lastId,
                                             @Query("direction") String direction,
                                             @Query("orderby") String order);

    
    @Authorization
    @POST("/emotion/comment/")
    Observable<Comment> commentReply(@Body CommentReplyReq req);

    
    @Authorization
    @PUT("/emotion/comment/")
    Observable<Comment> commentHeart(@Body CommentHeartReq req);

    
    @Authorization
    @POST("/emotion/v4/record/")
    Observable<Emotion> emotionRecord(@Body EmotionRecordReq req);


    
    @Authorization
    @GET("/emotion/v1/status/")
    Observable<UserActiveDateRes> getUserActiveDate();


    
    @Authorization
    @PUT("/emotion/record/")
    Observable<Emotion> emotionHeart(@Body EmotionHeartReq req);


    
    @Authorization
    @GET("emotion/v1/record/heart/list/")
    Observable<List<Profile>> likeList(@Query("record_id") int record_id);

    @Authorization
    @DELETE("/emotion/comment/")
    Observable<PlaceHolder> deleteComment(@Query("comment_id") int commentId);

    
    @Authorization
    @PUT("/emotion/v1/record/visibility/")
    Completable shieldEmotion(@Body RecordId recordId);


    
    @Authorization
    @DELETE("/emotion/record/")
    Completable deleteEmotion(@Query("record_id") int recordId,
                              @Query("record_today") int record_today);

    
    @Authorization
    @POST("/report/")
    Observable<ReportRes> report(@Body ReportReq reportReq);

    
    @Authorization
    @POST("/emotion/v1/background/")
    Completable postCover(@Body PostCover postCover);

    
    @Authorization
    @GET("/emotion/v2/record/list/")
    Observable<ListRes<Emotion>> getSameList(@Query("id") int id,
                                             @Query("direction") String direction,
                                             @Query("topic_id") int emotionTagId);


    
    @Authorization
    @GET("/emotion/v1/topic/")
    Observable<EmotionTag> getEmotionTagCreatorInfo(@Query("topic_id") int emotionTagId);

    
    @Authorization
    @POST("/emotion/v1/topic/")
    Observable<EmotionTag> createEmotionTag(@Body EmotionTagReq req);


    
    @Authorization
    @PUT("/emotion/v1/topic/")
    Observable<EmotionTag> updateEmotionTag(@Body EmotionTagReq req);


    
    @Authorization
    @DELETE("/emotion/v1/topic/")
    Completable deleteEmotionTag(@Body EmotionTagIdReq req);


    
    @Authorization
    @GET("/emotion/v1/topic/list/")
    Observable<List<EmotionTag>> getCertaionEmotionTags(@Query("emotion_type") String emotionState);



    
    @Authorization
    @GET("/emotion/v1/topic/list/")
    Observable<ListEmotionRes<EmotionTag>> findEmotionTags(@Query("keywords") String keywords);

    
    @Authorization
    @GET("/emotion/v3/material/")
    Observable<ListRes<EmotionSource>> getEmotionLib(@Query("id") Integer id,
                                                     @Query("direction") String direction,
                                                     @Query("limit") Integer limit,
                                                     @Query("emo_type") String emotion,
                                                     @Query("category") String category);

}
